package com.yanxu.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2025-09-22-2025
 * @Description: 这里用一句话描述这个类的作用
 */
@RestController
@RequestMapping("hello")
public class HelloController {

    @Autowired
    private RedisTemplate redisTemplate;

    @GetMapping("/hello01")
    public void  hello01(){
        Object username = redisTemplate.opsForValue().get("beijing");
        System.out.println(username);
    }
}